list-[id].vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. <template>
  2. <div id="newsList">
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 导航栏 -->
  6. <HomePageNavigation1></HomePageNavigation1>
  7. <!-- 列表页广告一 -->
  8. <HomeTopTen :imgurl="adImg1" v-if="adImg1"></HomeTopTen>
  9. <!-- 面包屑导航 -->
  10. <div class="breadcrumb">
  11. <div class="inner">
  12. <span class="location">当前位置:</span>
  13. <el-breadcrumb :separator-icon="ArrowRight">
  14. <el-breadcrumb-item>
  15. <NuxtLink to="/">首页</NuxtLink>
  16. </el-breadcrumb-item>
  17. <el-breadcrumb-item>本网招聘</el-breadcrumb-item>
  18. </el-breadcrumb>
  19. </div>
  20. </div>
  21. <!-- 资讯列表 -->
  22. <div class="newsList">
  23. <div class="inner">
  24. <div class="innerLeft">
  25. <!-- <div class="projectMoreBox">
  26. <div class="projectMoreTitle">社会保障在线网</div>
  27. <div class="projectMoreText">
  28. <p><b>政讯通·全国文化旅游项目</b>网络平台由<b>政讯通-全国政务信息一体化办公室</b>主管,联合30多家企事业单位组成,由北京政讯通文化传播有限公司对外牵头运营。</p>
  29. <p><b>政讯通·全国文化旅游项目</b>网络平台有政务、行业独立域名网站各<b>100</b>个和<b>4</b>个综合管理网站共<b>204</b>个网站,按照不同的行业和功能分类为用户提供大体系、广领域、全方位、全过程,有针对性的全国性文化旅游法制综合服务平台。</p>
  30. <p><b>政讯通·全国旅游资讯发布中心</b>是<b>政讯通·全国文化旅游项目</b>网络平台的4个综合管理网站之一,目前开设了栏目上千个,地市中心可全面覆盖我国334个地级市,<b>业务范围</b>涵盖旅游资讯、與情监测、法律咨询、旅游调研、法律宣传、群众监督、旅游安全等领域,日均会员访问量超过万次,累计完成文化旅游领域法制调研课题千余件,网络信息化会员遍布全国各地,实施<b>行业、区域</b>全覆盖,是我国具有广泛传播力、影响力的新型主流媒体。</p>
  31. </div>
  32. </div> -->
  33. <div class="innerTitle">本网招聘</div>
  34. <ul class="list">
  35. <li v-for="(item, index) in newsList" :key="index">
  36. <NuxtLink :to="{ path: `zhaopin/${item.id}.html` }" :title="item.con_title">
  37. {{ item.con_title }}</NuxtLink>
  38. </li>
  39. </ul>
  40. </div>
  41. <div class="innerRight">
  42. <div class="rightMenuTitle">导航列表</div>
  43. <ul>
  44. <li v-for="(item, index) in bottomMenu" :key="index">
  45. <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
  46. v-if="item.id == pageId && item.id != 7" class="active">
  47. {{ item.name }}
  48. </NuxtLink>
  49. <NuxtLink :to="`/about/${item.name_pinyin}/index.html`" :title="item.name"
  50. v-else-if="item.id != pageId && item.id != 7">
  51. {{ item.name }}
  52. </NuxtLink>
  53. <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
  54. v-if="item.id == 7 && pageId == 7" class="active">
  55. {{ item.name }}
  56. </NuxtLink>
  57. <NuxtLink :to="`/about/${item.name_pinyin}/list-1.html`" :title="item.name"
  58. v-else-if="item.id == 7">
  59. {{ item.name }}
  60. </NuxtLink>
  61. </li>
  62. </ul>
  63. </div>
  64. <div style="clear: both;"></div>
  65. </div>
  66. </div>
  67. <!-- 列表页广告二 -->
  68. <HomeTopTen :imgurl="adImg2" v-if="adImg2"></HomeTopTen>
  69. <!-- 页面底部 -->
  70. <HomeFoot1></HomeFoot1>
  71. </div>
  72. </template>
  73. <script setup>
  74. //1.页面依赖 start ---------------------------------------->
  75. import { ElBreadcrumb, ElBreadcrumbItem, ElPagination } from 'element-plus'
  76. import { ArrowRight } from '@element-plus/icons-vue'
  77. import { ref, onMounted } from 'vue';
  78. //获得跳转过来的id
  79. const route = useRoute();
  80. //获得当前的完整路径
  81. const fullPath = route.path;
  82. //拆分,取出来中间这一段,然后提取数字部分
  83. const segments = fullPath.split('/');
  84. const targetSegment = segments[2];
  85. //const numberPart = targetSegment.match(/\d+$/)?.[0];
  86. let articleId;
  87. let pageId;
  88. //通过导航路径反向查询导航id
  89. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  90. method: 'GET',
  91. query: {
  92. 'foot_pinyin': targetSegment,
  93. },
  94. });
  95. if (getRouteId.code == 200) {
  96. articleId = getRouteId.data.id;
  97. pageId = getRouteId.data.id;
  98. } else {
  99. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  100. console.log("错误位置:通过url路径查询导航池id")
  101. console.log("后端错误反馈:", getRouteId.message)
  102. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  103. }
  104. //1.页面依赖 end ---------------------------------------->
  105. //2.页面数据 start ---------------------------------------->
  106. //广告
  107. let adImg1 = ref([]);
  108. let adImg2 = ref([]);
  109. onMounted(async () => {
  110. //从客户端获取行政职能部门 加快打开速度
  111. const { $webUrl, $CwebUrl } = useNuxtApp();
  112. //广告1
  113. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0001`
  114. const responseAd1 = await fetch(url, {
  115. headers: {
  116. 'Content-Type': 'application/json',
  117. 'Userurl': $CwebUrl,
  118. 'Origin': $CwebUrl
  119. }
  120. });
  121. const resultAd1 = await responseAd1.json();
  122. adImg1.value = resultAd1.data[0];
  123. //广告2
  124. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=snzxw_page_0002`
  125. const responseAd2 = await fetch(url2, {
  126. headers: {
  127. 'Content-Type': 'application/json',
  128. 'Userurl': $CwebUrl,
  129. 'Origin': $CwebUrl
  130. }
  131. });
  132. const resultAd2 = await responseAd2.json();
  133. adImg2.value = resultAd2.data[0];
  134. })
  135. //左侧导航
  136. const bottomMenu = ref([]);
  137. async function getPageMenu() {
  138. const mkdata = await requestDataPromise('/web/getWebsiteFooterCategory', {
  139. method: 'GET',
  140. query: {},
  141. });
  142. bottomMenu.value = mkdata.data;
  143. }
  144. getPageMenu();
  145. //列表
  146. const newsList = ref([]);
  147. let newslists = async () => {
  148. const listData = await requestDataPromise('/web/getWebsiteFooterCategoryList', {
  149. method: 'GET',
  150. query: {
  151. 'fcat_id': pageId,
  152. },
  153. });
  154. newsList.value = listData.data;
  155. }
  156. //获得列表
  157. newslists();
  158. //2.页面数据 end ---------------------------------------->
  159. //3 设置seo信息
  160. const setData = await requestDataPromise('/web/getWebsiteFootInfo', {
  161. method: 'GET',
  162. query: {},
  163. });
  164. let seoTitle = setData.data.website_head.title;
  165. let seoDescription = setData.data.website_head.description;
  166. let seoKeywords = setData.data.website_head.keywords;
  167. let seoSuffix = setData.data.website_head.suffix;
  168. let seoName = setData.data.website_head.website_name;
  169. useSeoMeta({
  170. title: seoTitle + "_" + seoSuffix,
  171. meta: [
  172. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  173. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
  174. ]
  175. });
  176. //3.设置seo信息 end---------------------------------------->
  177. </script>
  178. <style lang="less" scoped>
  179. //导航条
  180. .breadcrumb {
  181. width: 100%;
  182. height: 22px;
  183. margin-bottom: 30px;
  184. font-family: Microsoft YaHei, Microsoft YaHei;
  185. font-weight: 400;
  186. font-size: 20px;
  187. color: #666666;
  188. line-height: 23px;
  189. text-align: left;
  190. font-style: normal;
  191. text-transform: none;
  192. :deep(.el-breadcrumb) {
  193. display: inline-block;
  194. vertical-align: -4px;
  195. }
  196. :deep(.el-breadcrumb__inner a),
  197. :deep(.el-breadcrumb__inner.is-link) {
  198. color: #666666;
  199. font-weight: 400;
  200. text-decoration: none;
  201. transition: var(--el-transition-color);
  202. }
  203. span {
  204. font-family: Microsoft YaHei, Microsoft YaHei;
  205. font-weight: 400;
  206. font-size: 20px;
  207. color: #666666;
  208. line-height: 23px;
  209. text-align: left;
  210. font-style: normal;
  211. text-transform: none;
  212. }
  213. span:hover {
  214. color: #666666;
  215. }
  216. .location {
  217. margin-right: 20px;
  218. width: 100px;
  219. height: 22px;
  220. font-family: Microsoft YaHei, Microsoft YaHei;
  221. font-weight: 400;
  222. font-size: 20px;
  223. color: #666666;
  224. line-height: 23px;
  225. text-align: left;
  226. font-style: normal;
  227. text-transform: none;
  228. }
  229. }
  230. // 资讯列表
  231. .newsList {
  232. width: 100%;
  233. margin-bottom: 70px;
  234. .inner {
  235. width: 1200px;
  236. .innerLeft {
  237. font-size: 22px;
  238. color: #028E21;
  239. font-weight: bold;
  240. }
  241. .innerTitle {
  242. height: 65px;
  243. line-height: 65px;
  244. font-size: 24px;
  245. }
  246. .innerLeft {
  247. float: right;
  248. >.list {
  249. height: 570px;
  250. margin-bottom: 70px;
  251. border-top: 1px solid #139602;
  252. >li {
  253. width: 790px;
  254. height: 60px;
  255. white-space: nowrap;
  256. overflow: hidden;
  257. text-overflow: ellipsis;
  258. line-height: 60px;
  259. //border-bottom: 1px solid #D9D9D9;
  260. >a {
  261. width: 360px;
  262. height: 26px;
  263. cursor: pointer;
  264. font-family: Microsoft YaHei, Microsoft YaHei;
  265. font-weight: 400;
  266. font-size: 20px;
  267. color: #333333;
  268. line-height: 26px;
  269. text-align: left;
  270. font-style: normal;
  271. text-transform: none;
  272. }
  273. }
  274. >li:hover>a {
  275. color: #139602;
  276. }
  277. >li:nth-child(1)::after,
  278. >li:nth-child(2)::after {
  279. content: "热";
  280. margin-left: 13px;
  281. background: #FF8A37;
  282. color: #fff;
  283. font-size: 14px;
  284. padding: 0px 2px;
  285. }
  286. >li:nth-child(5n) {
  287. border-bottom: 1px solid #D9D9D9;
  288. }
  289. }
  290. >.pagination {
  291. width: 800px;
  292. height: 34px;
  293. margin-left: 141px;
  294. display: flex;
  295. justify-content: center;
  296. margin: 0;
  297. // 鼠标移入后字体颜色
  298. .el-pagination::v-deep :hover {
  299. color: #139609;
  300. }
  301. .el-pagination.is-background::v-deep .btn-next,
  302. .el-pagination.is-background::v-deep .btn-prev {
  303. width: 70px;
  304. height: 34px;
  305. margin: 0px 10px;
  306. border-radius: 4px;
  307. }
  308. .el-pagination.is-background::v-deep .el-pager li {
  309. margin: 0px 10px;
  310. width: 38px;
  311. height: 34px;
  312. border-radius: 4px;
  313. }
  314. .el-pagination.is-background::v-deep .btn-next.is-active,
  315. .el-pagination.is-background::v-deep .btn-prev.is-active,
  316. .el-pagination.is-background::v-deep .el-pager li.is-active {
  317. background-color: #028e21;
  318. color: #fff;
  319. }
  320. }
  321. }
  322. .innerRight {
  323. width: 279px;
  324. .rightMenuTitle {
  325. width: 279px;
  326. height: 69px;
  327. font-size: 22px;
  328. font-weight: bold;
  329. line-height: 58px;
  330. text-align: center;
  331. color: #fff;
  332. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreTitle.png") no-repeat;
  333. margin-bottom: 30px;
  334. }
  335. ul {
  336. li {
  337. a {
  338. border-left: 5px solid #028E21;
  339. margin-bottom: 15px;
  340. font-size: 22px;
  341. display: block;
  342. height: 61px;
  343. line-height: 61px;
  344. color: #333333;
  345. text-align: center;
  346. background: #FBFBFB;
  347. }
  348. }
  349. }
  350. .active {
  351. border-left: 0;
  352. border: 1px solid #028E21;
  353. background: #fff;
  354. }
  355. }
  356. }
  357. }
  358. //资讯推荐
  359. .zixuntuijian {
  360. width: 100%;
  361. height: 290px;
  362. margin-bottom: 70px;
  363. .innerLeft {
  364. // 左侧
  365. .zixunLeft {
  366. margin-right: 30px;
  367. }
  368. .zixunRight,
  369. .zixunLeft {
  370. float: left;
  371. width: 380px;
  372. height: 290px;
  373. // 标题部分
  374. >.title {
  375. width: 380px;
  376. }
  377. >.title>h3 {
  378. height: 36px;
  379. font-family: Source Han Sans, Source Han Sans;
  380. font-weight: bold;
  381. font-size: 24px;
  382. color: #000000;
  383. line-height: 28px;
  384. text-align: left;
  385. font-style: normal;
  386. text-transform: none;
  387. border-bottom: 1px solid #139602;
  388. }
  389. >.title>h3>span {
  390. float: right;
  391. width: 56px;
  392. height: 20px;
  393. line-height: 24px;
  394. font-weight: 400;
  395. font-size: 14px;
  396. color: #999999;
  397. font-style: normal;
  398. text-transform: none;
  399. }
  400. .photo_text {
  401. >li:first-child {
  402. width: 380px;
  403. height: 120px;
  404. margin-top: 20px;
  405. margin-bottom: 15px;
  406. position: relative;
  407. >img {
  408. float: left;
  409. width: 160px;
  410. height: 120px;
  411. }
  412. >div {
  413. float: left;
  414. width: 220px;
  415. height: 120px;
  416. padding-left: 15px;
  417. padding-top: 6px;
  418. box-sizing: border-box;
  419. background-color: #f6f6f6;
  420. >h5 {
  421. width: 200px;
  422. height: 54px;
  423. display: -webkit-box;
  424. -webkit-box-orient: vertical;
  425. -webkit-line-clamp: 2;
  426. overflow: hidden;
  427. text-overflow: ellipsis;
  428. word-break: break-all;
  429. font-family: Source Han Sans, Source Han Sans;
  430. font-weight: 500;
  431. font-size: 18px;
  432. color: #333333;
  433. line-height: 26px;
  434. text-align: left;
  435. font-style: normal;
  436. text-transform: none;
  437. }
  438. >p {
  439. width: 200px;
  440. height: 22px;
  441. line-height: 20px;
  442. position: absolute;
  443. bottom: 5px;
  444. right: 0;
  445. >span {
  446. display: inline-block;
  447. // width: 100px;
  448. height: 18px;
  449. font-family: Source Han Sans, Source Han Sans;
  450. font-weight: 400;
  451. font-size: 12px;
  452. color: #999999;
  453. text-align: left;
  454. line-height: 14px;
  455. font-style: normal;
  456. text-transform: none;
  457. }
  458. >span:last-child {
  459. // width: 90px;
  460. text-align: right;
  461. margin-left: 20px;
  462. }
  463. }
  464. }
  465. }
  466. >li {
  467. width: 380px;
  468. height: 25px;
  469. white-space: nowrap;
  470. overflow: hidden;
  471. text-overflow: ellipsis;
  472. font-family: PingFang SC, PingFang SC;
  473. font-weight: 500;
  474. font-size: 18px;
  475. color: #333333;
  476. line-height: 21px;
  477. text-align: left;
  478. font-style: normal;
  479. text-transform: none;
  480. margin-bottom: 10px;
  481. em {
  482. display: inline-block;
  483. width: 8px;
  484. height: 8px;
  485. border-radius: 8px;
  486. margin-right: 10px;
  487. background-color: #d9d9d9;
  488. }
  489. }
  490. >li:hover {
  491. color: #139602;
  492. }
  493. >li:hover em {
  494. background-color: #139602;
  495. }
  496. }
  497. }
  498. }
  499. .innerRight {
  500. width: 381px;
  501. height: 290px;
  502. background-color: #fbfbfb;
  503. >.title {
  504. width: 380px;
  505. height: 40px;
  506. line-height: 40px;
  507. border-top: 1px solid #139602;
  508. border-bottom: 1px solid #e7e7e7;
  509. >h4 {
  510. font-family: Microsoft YaHei, Microsoft YaHei;
  511. font-weight: 400;
  512. margin-left: 20px;
  513. font-size: 20px;
  514. color: #000000;
  515. text-align: left;
  516. font-style: normal;
  517. text-transform: none;
  518. >span {
  519. float: right;
  520. font-family: Microsoft YaHei, Microsoft YaHei;
  521. font-weight: 400;
  522. font-size: 14px;
  523. margin-right: 10px;
  524. color: #999999;
  525. text-align: left;
  526. font-style: normal;
  527. text-transform: none;
  528. }
  529. }
  530. }
  531. .rightList {
  532. height: 540px;
  533. margin-top: 20px;
  534. >li {
  535. height: 100px;
  536. margin-bottom: 10px;
  537. >img {
  538. width: 150px;
  539. height: 100px;
  540. }
  541. >p {
  542. width: 219px;
  543. height: 100px;
  544. padding-left: 12px;
  545. font-family: PingFang SC, PingFang SC;
  546. font-weight: 400;
  547. font-size: 16px;
  548. color: #333333;
  549. line-height: 22px;
  550. text-align: left;
  551. font-style: normal;
  552. text-transform: none;
  553. }
  554. >p:hover {
  555. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  556. }
  557. }
  558. }
  559. }
  560. }
  561. .projectMoreBox {
  562. margin: 0 auto;
  563. height: 540px;
  564. margin-top: 20px;
  565. background: url("http://img.bjzxtw.org.cn/master/bjzxtw/public/special/projectMoreBg.png") no-repeat;
  566. margin-bottom: 40px;
  567. .projectMoreTitle {
  568. color: #028E21;
  569. padding-top: 20px;
  570. font-size: 26px;
  571. padding-left: 204px;
  572. }
  573. .projectMoreText {
  574. padding: 40px;
  575. font-size: 20px;
  576. color: #333333;
  577. text-indent: 2em;
  578. line-height: 36px;
  579. }
  580. }
  581. </style>